/**
 * Copyright (C), 2015-2019, XXX有限公司
 * FileName: SunlordResult
 * Author:   Administrator
 * Date:     2019/6/25 10:03
 * Description:
 * History:
 * <author>          <time>          <version>          <desc>
 * 作者姓名           修改时间           版本号              描述
 */
package com.sunlord.dto;

/**
 * 〈一句话功能简述〉<br> 
 * 〈返回结果〉
 *
 * @author Administrator
 * @create 2019/6/25
 * @since 1.0.0
 */
public class SunlordResult {
    private boolean  success;
    private String msg;

    private Object data;



    public SunlordResult() {
    }

    public  SunlordResult(boolean success, String msg) {
        this.success = success;
        this.msg = msg;
    }
    public static SunlordResult success( String msg) {
        return new SunlordResult(true, msg);
    }
    public static SunlordResult fail( String msg) {
        return new SunlordResult(false, msg);
    }

    public static SunlordResult  success(  Object data) {
       return  new SunlordResult(true,null,data);
    }
    public SunlordResult(boolean success, String msg, Object data) {
        this.success = success;
        this.msg = msg;
        this.data = data;
    }

    public boolean isSuccess() {
        return success;
    }

    public void setSuccess(boolean success) {
        this.success = success;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }
}